package com.easyCms.base.service;

import com.easyCms.base.common.CodeConst;
import com.easyCms.base.dao.CrmUserAuthDAO;
import com.easyCms.base.entity.CrmUserAuth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class CrmUserAuthSV {
    @Autowired
    private CrmUserAuthDAO crmUserAuthDAO;

    public CrmUserAuth save(CrmUserAuth crmUser) {
        return crmUserAuthDAO.save(crmUser);
    }

    public CrmUserAuth findByHamiCode(String identityCode) {
        return crmUserAuthDAO.findByHamiCodeAndState(identityCode, CodeConst.State.STATE_VALID);
    }

}
